home *** CD-ROM | disk | FTP | other *** search
-
-
-
- TEST User Commands TEST
-
-
-
- NNAAMMEE
- test - condition command
-
- SSYYNNOOPPSSIISS
- tteesstt expr
-
- DDEESSCCRRIIPPTTIIOONN
- _t_e_s_t evaluates the expression _e_x_p_r, and if its value is true
- then returns zero exit status; otherwise, a non zero exit
- status is returned. _t_e_s_t returns a non zero exit if there
- are no arguments.
-
- The following primitives are used to construct _e_x_p_r.
-
- --ee file true if the file exists and all the directories
- along its path may be searched.
-
- --rr file true if the file exists and is readable.
-
- --ww file true if the file exists and is writable.
-
- --xx file true if the file exists and is executable.
-
- --ff file true if the file exists and is not a directory.
-
- --dd file true if the file exists and is a directory.
-
- --hh file true if the file exists and is a symbolic link.
-
- --ss file true if the file exists and has a size greater than
- zero.
-
- --tt [ fildes ]
- true if the open file whose file descriptor number
- is _f_i_l_d_e_s (1 by default) is associated with a ter-
- minal device.
-
- --zz s1 true if the length of string _s_1 is zero.
-
- --nn s1 true if the length of the string _s_1 is nonzero.
-
- s1 == s2 true if the strings _s_1 and _s_2 are equal.
-
- s1 !!== s2 true if the strings _s_1 and _s_2 are not equal.
-
- s1 true if _s_1 is not the null string.
-
- n1 --eeqq n2
- true if the integers _n_1 and _n_2 are algebraically
- equal. Any of the comparisons --nnee, --ggtt, --ggee, --lltt,
- or --llee may be used in place of --eeqq.
-
-
-
-
- Sprite v1.0 September 22, 1987 1
-
-
-
-
-
-
- TEST User Commands TEST
-
-
-
- These primaries may be combined with the following opera-
- tors:
-
- !! unary negation operator
-
- --aa binary _a_n_d operator
-
- --oo binary _o_r operator
-
- (( expr ))
- parentheses for grouping.
-
- --aa has higher precedence than --oo.. Notice that all the opera-
- tors and flags are separate arguments to _t_e_s_t. Notice also
- that parentheses are meaningful to the Shell and must be
- escaped.
-
- SSEEEE AALLSSOO
- sh(1), find(1)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Sprite v1.0 September 22, 1987 2
-
-
-
-